//
//  CollectionViewCell.m
//  B段项目
//
//  Created by 昶博 on 15/9/23.
//  Copyright (c) 2015年 昶博. All rights reserved.
//

#import "CollectionViewCell.h"
#import <UIImageView+WebCache.h>
#import "PrefixHeader.pch"
@implementation CollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.image = [[UIImageView alloc]init];
        self.image.backgroundColor = [UIColor blueColor];
        self.image.layer.cornerRadius = 40*w;
        self.image.layer.masksToBounds = YES;
        [self.contentView addSubview:self.image];
        self.Carlabel = [[UILabel alloc]init];
       self.Carlabel.font = [UIFont systemFontOfSize:15*w];
                                    
        [self.contentView addSubview:self.Carlabel];
        self.timeLabel = [[UILabel alloc]init];
        self.timeLabel.font = [UIFont systemFontOfSize:13*w];
        [self.contentView addSubview:self.timeLabel];
        
        
    }
    return self;
    
}
-(void)layoutSubviews
{
    self.image.frame = CGRectMake(15*w, 5*h, 80*w, 80*h);
    self.Carlabel.frame = CGRectMake(13*w, 90*h, 110*w, 20*h);
    self.timeLabel.frame = CGRectMake(14*w, 110*h, 90*w, 20*h);
    
    
}
-(void)setModel:(ForthModel *)Model
{
    [self.image sd_setImageWithURL:[NSURL URLWithString:Model.album_imgurl] placeholderImage:[UIImage imageNamed:@"44.jpg"]];
    self.Carlabel.text = Model.album_name;
    self.timeLabel.text = Model.update_time;
}
@end
